ADD_SUBDIRECTORY(pcg)
ADD_SUBDIRECTORY(dense)
ADD_SUBDIRECTORY(structure_only)

IF(CSPARSE_FOUND)
  ADD_SUBDIRECTORY(csparse)
  ADD_SUBDIRECTORY(slam2d_linear)
ENDIF()

IF(CHOLMOD_FOUND)
  ADD_SUBDIRECTORY(cholmod)
ENDIF(CHOLMOD_FOUND)

# Sparse Module of Eigen is stable starting from 3.1
IF (DEFINED EIGEN3_VERSION)
  IF(${EIGEN3_VERSION} VERSION_GREATER "3.1.0" OR ${EIGEN3_VERSION} VERSION_EQUAL "3.1.0")
    ADD_SUBDIRECTORY(eigen)
  ENDIF()
ENDIF()
